package com.seewo.dubbo.debugger.api.model;

import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author chenliangliang
 * @date 2018/7/26
 */
@Data
public class ParamDef implements Serializable {

    private static final long serialVersionUID = -8855198578775114491L;


    private Integer methodId;
    private String name;
    private String type;
    private String description;
    private Integer index;
    private String value;
    private Integer id;

    private ModelDef modelDef;
    private String modelJson;
    private String requestJson;
    private String responseJson;


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof ParamDef)) return false;
        ParamDef paramDef = (ParamDef) o;
        return Objects.equals(methodId, paramDef.methodId) &&
                Objects.equals(name, paramDef.name) &&
                Objects.equals(type, paramDef.type);
    }

    @Override
    public int hashCode() {

        return Objects.hash(methodId, name, type);
    }
}
